<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <p>当可视窗口宽度小于360px时，显示340px大小，其他情况显示为128px</p>
  <img src="./images/128px.jpg" 
        srcset="./images/128px.jpg 128w, 
        ./images/256px.jpg 320w, 
        ./images/512px.jpg 512w" 
        sizes="(max-width: 360px) 340px, 128px">

  <p>当可视窗口宽度小于360px时，显示calc(100vw - 20px)大小，其他情况显示为128px</p>
  <img src="./images/128px.jpg" 
        srcset="./images/128px.jpg 128w, 
                ./images/256px.jpg 320w, 
                ./images/512px.jpg 512w"
        sizes="(max-width: 360px) calc(100vw - 20px), 128px">
</body>

</html>